package com.ship.dispatch.service.impl;

import com.ship.common.business.service.impl.BaseServiceImpl;
import com.ship.dispatch.bean.SpShipAgencyFeeHistory;
import com.ship.dispatch.bo.SpShipAgencyFeeHistoryBo;
import com.ship.dispatch.mapper.SpShipAgencyFeeHistoryMapper;
import com.ship.dispatch.service.SpShipAgencyFeeHistoryService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

@Service
public class SpShipAgencyFeeHistoryServiceImpl extends BaseServiceImpl<SpShipAgencyFeeHistoryMapper, SpShipAgencyFeeHistory> implements SpShipAgencyFeeHistoryService {

    /**
     * 同步历史船代费
     * @param shipAgencyFeeHistoryBo
     * @return
     */
    @Override
    public Boolean synchronShipAgencyFeeHistory(SpShipAgencyFeeHistoryBo shipAgencyFeeHistoryBo){
        Boolean judge = false;
        SpShipAgencyFeeHistory spShipAgencyFeeHistory = new SpShipAgencyFeeHistory();
        BeanUtils.copyProperties(shipAgencyFeeHistoryBo,spShipAgencyFeeHistory);
        judge = this.save(spShipAgencyFeeHistory);
        return judge;
    }
}
